import React, { Component } from 'react';
import {
    View,
    Text,
    Button,
} from 'react-native';

import {StackNavigator} from 'react-navigation';

const App = StackNavigator({
    Home: {screen: Home},
    Next: {screen: Next},
});

export default class Home extends Component {
    constructor(props) {
        super(props);
        this.state = {showText: true};
    }
    static defaultProps = {
        sex: '男',
    };
    render() {
        return (
            <View>
                <Text style={{fontSize: 20,color: '#000'}}>this is name {this.props.name}</Text>
                <Text style={{fontSize: 20,color: '#000'}}>this is sex {this.props.sex}</Text>
                <Button
                    onPress={() =>
                        navigate('Profile', { name: 'Jane' })}
                    title="Learn More"
                />
            </View>
        )
    }
}

